Q26: What is/are the difference(s) between a state variable and a

local variable?

A. State variables can be accessed from anywhere in the

contract, whereas the scope of the local variables are limited to

the function

B. State variables are stored permanent storage, whereas the

local variables are stored in temporary storage

C. State variables are more expensive than the local variables

D. All of the above

Q27: Which of the visibility types is not applicable for the state

variables that is left blank in the following code?

// SPDX-License-Identifier: SOME IDENTIFIER

pragma solidity ^0.8.10;

// A simple contract with getter and setter functions

contract GetterSetterContract {

string ___ value1 = “Some Value 1”;

string value2 = “Some Value 2”;

function getValues() public view returns(string memory,

string memory) {

return (value1, value2);

}

function setValue(string calldata newValue1, string calldata

newValue2) public {

value1 = newValue1;

value2 = newValue2;

}

}

A. public

B. internal

C. private

D. external